package com.the_ring.structural.proxy.jdk;

import java.lang.reflect.Proxy;

/**
 * @author: t22306139
 * @date: 2023/12/1  9:01
 */
public class BuyHouseJdkProxyTest {

    public static void main(String[] args) {
        BuyHouseService buyHouseService = new BuyHouseService();
        BuyHouseInterface buyHouseJdkProxy = (BuyHouseInterface) Proxy.newProxyInstance(BuyHouseService.class.getClassLoader(), new Class[]{BuyHouseInterface.class}, new BuyHouseJdkProxy(buyHouseService));
        buyHouseJdkProxy.buyHouse();
    }
}
